package com.wteam.dragon.shop.pojo.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.*;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import com.wteam.dragon.system.basebean.bean.BaseBean;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 商品类型
 * @Author 陈晓辉
 * @Date 2020/6/29 15:27
 */

@Data
@Table
@TableName
@EqualsAndHashCode(callSuper = true)
public class ProductType extends BaseBean {
    @IsKey
    @IsNotNull
    @IsAutoIncrement
    @TableId(type = IdType.AUTO)
    @ColumnType(MySqlTypeConstant.BIGINT)
    @Column(comment = "自增id")
    private Long id;

    @IsNotNull
    @Column(comment = "类型名称")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    private String name;

    /**
     * 属性数量
     */
    @TableField(exist = false)
    private Integer attributeCount;

    /**
     * 参数数量
     */
    @TableField(exist = false)
    private Integer paramCount;
}
